{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 《Python数据分析基础 — 数据可视化（第2版）》\n",
    "## 习题3 \n",
    "## 二、分析题\n",
    "**（请在问题下面的空白框写出代码并执行以输出结果）**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1. 请创建下列Python数组，并计算。"
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "（1）创建一个2*2的数组，计算对角线上元素的和。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "（2）创建一个长度为9的一维数据，数组元素0～8，并将它重新变为3*3的二维数组。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "（3）创建两个3*3的数组，分别将它们合并为3*6、6*3的数组后，拆分为3个数组。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "2.调查数据。某公司对财务部门人员的抽烟状态进行调查，结果为：\n",
    "\n",
    "    否，否，否，是，是，否，否，是，否，是，否，否，是，是，否，是，否，否，是，是。"
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "（1）请用列表录入该数据。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "（2）请将这组数据输入电子表格，并将其读入Python。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "3. 对第2章建立的电子表格mydata1.xlsx数据，"
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "（1）将上面的4组数据写入其中的表单。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "（2）分别用Python 的read_csv和read_excel函数读取。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "（3）对其中的学生数据，用Python方法获取性别、数学成绩和统计成绩变量，并筛选不同性别学生的成绩。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
